package com.own.dondeestoy.data;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

import com.own.dondeestoy.load.*;

public class Session extends SQLiteOpenHelper implements ISession {

	private static final String LOGTAG = "Session";
	private static SQLiteDatabase _dataBase;
	private static final String DATABASE_NAME = "Data.db";
	private static final int DATABASE_VERSION = 1;	
	
	public Session(Context context) {
		super(context, DATABASE_NAME, null, DATABASE_VERSION);
	}

	public void Close() {
		try{
			if(_dataBase != null)
				_dataBase.close();
			Log.i(LOGTAG, "Database closed.");
		}
		catch(SQLiteException ex){
			Log.e(LOGTAG, "Error closing the database.", ex);
			throw ex;
		}
	}

	public boolean Open() {
		boolean opened = false;
		try{
			_dataBase = getWritableDatabase();			
			opened = _dataBase.isOpen();
			Log.i(LOGTAG, "Database opened.");
		}
		catch(SQLiteException ex){
			opened = false;
			Log.e(LOGTAG, "Error opening the database.", ex);
			throw ex;
		}
		return opened;
	}

	public boolean isOpen() {
		return (_dataBase != null && _dataBase.isOpen());
	}

	public boolean TransactionInProcess() {
		return _dataBase.inTransaction();
	}

	public void BeginTransaction() {
		_dataBase.beginTransaction();
	}

	public void TransactionRoolBack() {
		//_dataBase.c
	}

	public void CommitTransaction() {
		_dataBase.setTransactionSuccessful();
	}

	public void EndTransaction() {
		_dataBase.endTransaction();	
	}

	public SQLiteDatabase Connection() {
		return _dataBase;
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		try{
			db.execSQL(CreateCardType());
			db.execSQL(CreateParameter());
			db.execSQL(CreateCard());			
									
			//Inserto registros
			db.execSQL(Parametrics.CardType1());
			db.execSQL(Parametrics.CardType2());
			db.execSQL(Parametrics.CardType3());
			db.execSQL(Parametrics.CardType4());
			db.execSQL(Parametrics.CardType5());
			db.execSQL(Parametrics.CardType6());
			db.execSQL(Parametrics.Parameter1());
			db.execSQL(Parametrics.Parameter2());
			db.execSQL(Parametrics.Parameter3());
								
			
			db.execSQL(Conectivity.Insert1());
			db.execSQL(Conectivity.Insert2());
			db.execSQL(Conectivity.Insert3());
			db.execSQL(Conectivity.Insert4());
			db.execSQL(Conectivity.Insert5());
			db.execSQL(Conectivity.Insert6());
			db.execSQL(Conectivity.Insert7());
			db.execSQL(Conectivity.Insert8());
			db.execSQL(Conectivity.Insert9());
			db.execSQL(Conectivity.Insert10());
			db.execSQL(Conectivity.Insert11());
			db.execSQL(Conectivity.Insert12());
			db.execSQL(Conectivity.Insert13());
			db.execSQL(Conectivity.Insert14());
			db.execSQL(Conectivity.Insert15());
			db.execSQL(Conectivity.Insert16());
			db.execSQL(Conectivity.Insert17());
			db.execSQL(Conectivity.Insert18());
			db.execSQL(Conectivity.Insert19());
			db.execSQL(Conectivity.Insert20());
			db.execSQL(Conectivity.Insert21());
			db.execSQL(Conectivity.Insert22());
			db.execSQL(Conectivity.Insert23());
//			db.execSQL(Conectivity.Insert24());
			db.execSQL(Conectivity.Insert25());
			db.execSQL(Conectivity.Insert26());
			db.execSQL(Conectivity.Insert27());
			db.execSQL(Conectivity.Insert28());
			db.execSQL(Conectivity.Insert29());
			db.execSQL(Conectivity.Insert30());
			db.execSQL(Conectivity.Insert31());
			db.execSQL(Conectivity.Insert32());
			db.execSQL(Conectivity.Insert33());
			db.execSQL(Conectivity.Insert34());
			db.execSQL(Conectivity.Insert35());
			db.execSQL(Conectivity.Insert36());
			db.execSQL(Conectivity.Insert37());
			db.execSQL(Conectivity.Insert38());
			db.execSQL(Conectivity.Insert39());
			db.execSQL(Conectivity.Insert40());
			db.execSQL(Conectivity.Insert41());
			db.execSQL(Conectivity.Insert42());			
			db.execSQL(Conectivity.Insert43());
			db.execSQL(Conectivity.Insert44());
			db.execSQL(Conectivity.Insert45());
			db.execSQL(Conectivity.Insert46());
			db.execSQL(Conectivity.Insert47());
			db.execSQL(Conectivity.Insert48());
			db.execSQL(Conectivity.Insert49());
			db.execSQL(Conectivity.Insert50());
			db.execSQL(Conectivity.Insert51());
			db.execSQL(Conectivity.Insert52());
			db.execSQL(Conectivity.Insert53());
			db.execSQL(Conectivity.Insert54());
			db.execSQL(Conectivity.Insert55());
			db.execSQL(Conectivity.Insert56());
			db.execSQL(Conectivity.Insert57());
			db.execSQL(Conectivity.Insert58());
			db.execSQL(Conectivity.Insert59());
			db.execSQL(Conectivity.Insert60());
			db.execSQL(Conectivity.Insert61());
			db.execSQL(Conectivity.Insert62());
			db.execSQL(Conectivity.Insert63());
			db.execSQL(Conectivity.Insert64());
			db.execSQL(Conectivity.Insert65());
			db.execSQL(Conectivity.Insert66());
			db.execSQL(Conectivity.Insert67());
			db.execSQL(Conectivity.Insert68());
			db.execSQL(Conectivity.Insert69());
			db.execSQL(Conectivity.Insert70());
			db.execSQL(Conectivity.Insert71());
			db.execSQL(Conectivity.Insert72());
			db.execSQL(Conectivity.Insert73());
			db.execSQL(Conectivity.Insert74());
			db.execSQL(Conectivity.Insert75());
			db.execSQL(Conectivity.Insert76());
			db.execSQL(Conectivity.Insert77());
			db.execSQL(Conectivity.Insert78());
			db.execSQL(Conectivity.Insert79());
			db.execSQL(Conectivity.Insert80());
			db.execSQL(Conectivity.Insert81());
			db.execSQL(Conectivity.Insert82());
			db.execSQL(Conectivity.Insert83());
			db.execSQL(Conectivity.Insert84());
			db.execSQL(Conectivity.Insert85());
			db.execSQL(Conectivity.Insert86());
			db.execSQL(Conectivity.Insert87());
			db.execSQL(Conectivity.Insert88());
			db.execSQL(Conectivity.Insert89());
			db.execSQL(Conectivity.Insert90());
			db.execSQL(Conectivity.Insert91());
			db.execSQL(Conectivity.Insert92());
			db.execSQL(Conectivity.Insert93());
			db.execSQL(Conectivity.Insert94());
			db.execSQL(Conectivity.Insert95());
			db.execSQL(Conectivity.Insert96());
			db.execSQL(Conectivity.Insert97());
			db.execSQL(Conectivity.Insert98());
			db.execSQL(Conectivity.Insert99());
			db.execSQL(Conectivity.Insert100());
			db.execSQL(Conectivity.Insert101());
			db.execSQL(Conectivity.Insert102());
			db.execSQL(Conectivity.Insert103());
			db.execSQL(Conectivity.Insert104());
			db.execSQL(Conectivity.Insert105());
			
			db.execSQL(Hotel.Insert1());
			db.execSQL(Hotel.Insert2());
			db.execSQL(Hotel.Insert3());
			db.execSQL(Hotel.Insert4());
			db.execSQL(Hotel.Insert5());
			db.execSQL(Hotel.Insert6());
			db.execSQL(Hotel.Insert7());
			db.execSQL(Hotel.Insert8());
			db.execSQL(Hotel.Insert9());
			db.execSQL(Hotel.Insert10());
			db.execSQL(Hotel.Insert11());
			db.execSQL(Hotel.Insert12());
			db.execSQL(Hotel.Insert13());
			db.execSQL(Hotel.Insert14());
			db.execSQL(Hotel.Insert15());			
			db.execSQL(Hotel.Insert16());
			db.execSQL(Hotel.Insert17());
			db.execSQL(Hotel.Insert18());
			db.execSQL(Hotel.Insert19());
			db.execSQL(Hotel.Insert20());
			db.execSQL(Hotel.Insert21());
			db.execSQL(Hotel.Insert22());
			db.execSQL(Hotel.Insert23());
			db.execSQL(Hotel.Insert24());
			db.execSQL(Hotel.Insert25());
			db.execSQL(Hotel.Insert26());
			db.execSQL(Hotel.Insert27());
			db.execSQL(Hotel.Insert28());
			db.execSQL(Hotel.Insert29());
			db.execSQL(Hotel.Insert30());
			db.execSQL(Hotel.Insert31());
			db.execSQL(Hotel.Insert32());
			db.execSQL(Hotel.Insert33());
			db.execSQL(Hotel.Insert34());
			db.execSQL(Hotel.Insert35());  
			db.execSQL(Hotel.Insert36());
			db.execSQL(Hotel.Insert37());
			db.execSQL(Hotel.Insert38());
			db.execSQL(Hotel.Insert39());
			db.execSQL(Hotel.Insert40());
			db.execSQL(Hotel.Insert41());
			db.execSQL(Hotel.Insert42());
			db.execSQL(Hotel.Insert43());
			db.execSQL(Hotel.Insert44());
			db.execSQL(Hotel.Insert45());
			db.execSQL(Hotel.Insert46());
			db.execSQL(Hotel.Insert47());
			db.execSQL(Hotel.Insert48());
			db.execSQL(Hotel.Insert49());
			db.execSQL(Hotel.Insert50());
			db.execSQL(Hotel.Insert51());
			db.execSQL(Hotel.Insert52());
			db.execSQL(Hotel.Insert53());
			db.execSQL(Hotel.Insert54());
			db.execSQL(Hotel.Insert55());
			db.execSQL(Hotel.Insert56());
			db.execSQL(Hotel.Insert57());
			db.execSQL(Hotel.Insert58());
			db.execSQL(Hotel.Insert59());			
			db.execSQL(Hotel.Insert60());
			db.execSQL(Hotel.Insert61());
			db.execSQL(Hotel.Insert62());
			db.execSQL(Hotel.Insert63());
			db.execSQL(Hotel.Insert64());
			db.execSQL(Hotel.Insert65());  
			db.execSQL(Hotel.Insert66());
			db.execSQL(Hotel.Insert67());
			db.execSQL(Hotel.Insert68());
			db.execSQL(Hotel.Insert69());
			db.execSQL(Hotel.Insert70());
			db.execSQL(Hotel.Insert71());
			db.execSQL(Hotel.Insert72());
			db.execSQL(Hotel.Insert73());
			db.execSQL(Hotel.Insert74());
			db.execSQL(Hotel.Insert75());
			db.execSQL(Hotel.Insert76());
			db.execSQL(Hotel.Insert77());
			db.execSQL(Hotel.Insert78());
			db.execSQL(Hotel.Insert79());
			db.execSQL(Hotel.Insert80());
			db.execSQL(Hotel.Insert81());
			db.execSQL(Hotel.Insert82());
			db.execSQL(Hotel.Insert83());
			db.execSQL(Hotel.Insert84());
			db.execSQL(Hotel.Insert85());
			db.execSQL(Hotel.Insert86());
			db.execSQL(Hotel.Insert87());
			db.execSQL(Hotel.Insert88());
			db.execSQL(Hotel.Insert89());
			db.execSQL(Hotel.Insert90());
			db.execSQL(Hotel.Insert91());
			db.execSQL(Hotel.Insert92());
			db.execSQL(Hotel.Insert93());
			db.execSQL(Hotel.Insert94());
			db.execSQL(Hotel.Insert95());
			db.execSQL(Hotel.Insert96());
			db.execSQL(Hotel.Insert97());
			db.execSQL(Hotel.Insert98());
			db.execSQL(Hotel.Insert99());
			db.execSQL(Hotel.Insert100());
			

			db.execSQL(Boliche.Insert1());
			db.execSQL(Boliche.Insert2());
			db.execSQL(Boliche.Insert3());
			db.execSQL(Boliche.Insert4());
			db.execSQL(Boliche.Insert5());
			db.execSQL(Boliche.Insert6());
			db.execSQL(Boliche.Insert7());
			db.execSQL(Boliche.Insert8());
			db.execSQL(Boliche.Insert9());
			db.execSQL(Boliche.Insert10());
			db.execSQL(Boliche.Insert11());
			db.execSQL(Boliche.Insert12());
			db.execSQL(Boliche.Insert13());
			db.execSQL(Boliche.Insert14());
			db.execSQL(Boliche.Insert15());			
			db.execSQL(Boliche.Insert16());
			db.execSQL(Boliche.Insert17());
			db.execSQL(Boliche.Insert18());
			db.execSQL(Boliche.Insert19());
			db.execSQL(Boliche.Insert20());
			db.execSQL(Boliche.Insert21());
			db.execSQL(Boliche.Insert22());
			db.execSQL(Boliche.Insert23());
			db.execSQL(Boliche.Insert24());
			db.execSQL(Boliche.Insert25());
			db.execSQL(Boliche.Insert26());
			db.execSQL(Boliche.Insert27());
			db.execSQL(Boliche.Insert28());
			db.execSQL(Boliche.Insert29());
			db.execSQL(Boliche.Insert30());
			db.execSQL(Boliche.Insert31());
			db.execSQL(Boliche.Insert32());
			db.execSQL(Boliche.Insert33());
			db.execSQL(Boliche.Insert34());
			db.execSQL(Boliche.Insert35());  
			db.execSQL(Boliche.Insert36());
			db.execSQL(Boliche.Insert37());
			db.execSQL(Boliche.Insert38());
			db.execSQL(Boliche.Insert39());
			db.execSQL(Boliche.Insert40());
			db.execSQL(Boliche.Insert41());
			db.execSQL(Boliche.Insert42());
			db.execSQL(Boliche.Insert43());
			db.execSQL(Boliche.Insert44());
			db.execSQL(Boliche.Insert45());
			db.execSQL(Boliche.Insert46());
			db.execSQL(Boliche.Insert47());
			db.execSQL(Boliche.Insert48());
			db.execSQL(Boliche.Insert49());
			db.execSQL(Boliche.Insert50());
			db.execSQL(Boliche.Insert51());
			db.execSQL(Boliche.Insert52());
			db.execSQL(Boliche.Insert53());
			db.execSQL(Boliche.Insert54());
			db.execSQL(Boliche.Insert55());
			db.execSQL(Boliche.Insert56());
			db.execSQL(Boliche.Insert57());
			db.execSQL(Boliche.Insert58());
			db.execSQL(Boliche.Insert59());			
			db.execSQL(Boliche.Insert60());
			db.execSQL(Boliche.Insert61());
			db.execSQL(Boliche.Insert62());
			db.execSQL(Boliche.Insert63());
			db.execSQL(Boliche.Insert64());
			db.execSQL(Boliche.Insert65());  
			db.execSQL(Boliche.Insert66());
			db.execSQL(Boliche.Insert67());
			db.execSQL(Boliche.Insert68());
			db.execSQL(Boliche.Insert69());
			db.execSQL(Boliche.Insert70());
			db.execSQL(Boliche.Insert71());
			db.execSQL(Boliche.Insert72());
			db.execSQL(Boliche.Insert73());
			db.execSQL(Boliche.Insert74());
			db.execSQL(Boliche.Insert75());
			db.execSQL(Boliche.Insert76());
			db.execSQL(Boliche.Insert77());
			db.execSQL(Boliche.Insert78());
			db.execSQL(Boliche.Insert79());
			db.execSQL(Boliche.Insert80());
			db.execSQL(Boliche.Insert81());
			db.execSQL(Boliche.Insert82());
			db.execSQL(Boliche.Insert83());
			db.execSQL(Boliche.Insert84());
			db.execSQL(Boliche.Insert85());
			db.execSQL(Boliche.Insert86());
			db.execSQL(Boliche.Insert87());
			db.execSQL(Boliche.Insert88());
			db.execSQL(Boliche.Insert89());
			db.execSQL(Boliche.Insert90());
			db.execSQL(Boliche.Insert91());
			db.execSQL(Boliche.Insert92());
			db.execSQL(Boliche.Insert93());
			db.execSQL(Boliche.Insert94());
			db.execSQL(Boliche.Insert95());
			db.execSQL(Boliche.Insert96());
			db.execSQL(Boliche.Insert97());
			db.execSQL(Boliche.Insert98());
			db.execSQL(Boliche.Insert99());
			db.execSQL(Boliche.Insert100());
			db.execSQL(Boliche.Insert101());
			db.execSQL(Boliche.Insert102());
			db.execSQL(Boliche.Insert103());
			db.execSQL(Boliche.Insert104());
			db.execSQL(Boliche.Insert105());
			db.execSQL(Boliche.Insert106());
			db.execSQL(Boliche.Insert107());
			db.execSQL(Boliche.Insert108());
			db.execSQL(Boliche.Insert109());
			db.execSQL(Boliche.Insert110());
			db.execSQL(Boliche.Insert111());
			db.execSQL(Boliche.Insert112());
			db.execSQL(Boliche.Insert113());
			db.execSQL(Boliche.Insert114());
			db.execSQL(Boliche.Insert115());
			db.execSQL(Boliche.Insert116());
			
			db.execSQL(Biblioteca.Insert1());
			db.execSQL(Biblioteca.Insert2());
			db.execSQL(Biblioteca.Insert3());
			db.execSQL(Biblioteca.Insert4());
			db.execSQL(Biblioteca.Insert5());
			db.execSQL(Biblioteca.Insert6());
			db.execSQL(Biblioteca.Insert7());
			db.execSQL(Biblioteca.Insert8());
			db.execSQL(Biblioteca.Insert9());
			db.execSQL(Biblioteca.Insert10());
			db.execSQL(Biblioteca.Insert11());
			db.execSQL(Biblioteca.Insert12());
			db.execSQL(Biblioteca.Insert13());
			db.execSQL(Biblioteca.Insert14());
			db.execSQL(Biblioteca.Insert15());			
			db.execSQL(Biblioteca.Insert16());
			db.execSQL(Biblioteca.Insert17());
			db.execSQL(Biblioteca.Insert18());
			db.execSQL(Biblioteca.Insert19());
			db.execSQL(Biblioteca.Insert20());
			db.execSQL(Biblioteca.Insert21());
			db.execSQL(Biblioteca.Insert22());
			db.execSQL(Biblioteca.Insert23());
			db.execSQL(Biblioteca.Insert24());
			db.execSQL(Biblioteca.Insert25());
			db.execSQL(Biblioteca.Insert26());
			db.execSQL(Biblioteca.Insert27());
			db.execSQL(Biblioteca.Insert28());
			db.execSQL(Biblioteca.Insert29());
			db.execSQL(Biblioteca.Insert30());
			db.execSQL(Biblioteca.Insert31());
			db.execSQL(Biblioteca.Insert32());
			db.execSQL(Biblioteca.Insert33());
			db.execSQL(Biblioteca.Insert34());
			db.execSQL(Biblioteca.Insert35());  
			db.execSQL(Biblioteca.Insert36());
			db.execSQL(Biblioteca.Insert37());
			db.execSQL(Biblioteca.Insert38());
			db.execSQL(Biblioteca.Insert39());
			db.execSQL(Biblioteca.Insert40());
			db.execSQL(Biblioteca.Insert41());
			db.execSQL(Biblioteca.Insert42());
			db.execSQL(Biblioteca.Insert43());
			db.execSQL(Biblioteca.Insert44());
			db.execSQL(Biblioteca.Insert45());
			db.execSQL(Biblioteca.Insert46());
			db.execSQL(Biblioteca.Insert47());
			db.execSQL(Biblioteca.Insert48());
			db.execSQL(Biblioteca.Insert49());
			db.execSQL(Biblioteca.Insert50());
			db.execSQL(Biblioteca.Insert51());
			db.execSQL(Biblioteca.Insert52());
			db.execSQL(Biblioteca.Insert53());
			db.execSQL(Biblioteca.Insert54());
			db.execSQL(Biblioteca.Insert55());
			db.execSQL(Biblioteca.Insert56());
			db.execSQL(Biblioteca.Insert57());
			db.execSQL(Biblioteca.Insert58());
			db.execSQL(Biblioteca.Insert59());			
			db.execSQL(Biblioteca.Insert60());
			db.execSQL(Biblioteca.Insert61());
			db.execSQL(Biblioteca.Insert62());
			db.execSQL(Biblioteca.Insert63());
			db.execSQL(Biblioteca.Insert64());
			db.execSQL(Biblioteca.Insert65());  
			db.execSQL(Biblioteca.Insert66());
			db.execSQL(Biblioteca.Insert67());
			db.execSQL(Biblioteca.Insert68());
			
			db.execSQL(Bicicleta.Insert1());
			db.execSQL(Bicicleta.Insert2());
			db.execSQL(Bicicleta.Insert3());
			db.execSQL(Bicicleta.Insert4());
			db.execSQL(Bicicleta.Insert5());
			db.execSQL(Bicicleta.Insert6());
			db.execSQL(Bicicleta.Insert7());
			db.execSQL(Bicicleta.Insert8());
			db.execSQL(Bicicleta.Insert9());
			db.execSQL(Bicicleta.Insert10());
			db.execSQL(Bicicleta.Insert11());
			db.execSQL(Bicicleta.Insert12());
			db.execSQL(Bicicleta.Insert13());
			db.execSQL(Bicicleta.Insert14());
			db.execSQL(Bicicleta.Insert15());			
			db.execSQL(Bicicleta.Insert16());
			db.execSQL(Bicicleta.Insert17());
			db.execSQL(Bicicleta.Insert18());
			db.execSQL(Bicicleta.Insert19());
			db.execSQL(Bicicleta.Insert20());
			db.execSQL(Bicicleta.Insert21());
			db.execSQL(Bicicleta.Insert22());
			db.execSQL(Bicicleta.Insert23());
			db.execSQL(Bicicleta.Insert24());
			db.execSQL(Bicicleta.Insert25());
			db.execSQL(Bicicleta.Insert26());
			db.execSQL(Bicicleta.Insert27());
			db.execSQL(Bicicleta.Insert28());
			db.execSQL(Bicicleta.Insert29());
			db.execSQL(Bicicleta.Insert30());
			db.execSQL(Bicicleta.Insert31());
			db.execSQL(Bicicleta.Insert32());
			

			db.execSQL(Subte.Insert1());
			db.execSQL(Subte.Insert2());
			db.execSQL(Subte.Insert3());
			db.execSQL(Subte.Insert4());
			db.execSQL(Subte.Insert5());
			db.execSQL(Subte.Insert6());
			db.execSQL(Subte.Insert7());
			db.execSQL(Subte.Insert8());
			db.execSQL(Subte.Insert9());
			db.execSQL(Subte.Insert10());
			db.execSQL(Subte.Insert11());
			db.execSQL(Subte.Insert12());
			db.execSQL(Subte.Insert13());
			db.execSQL(Subte.Insert14());
			db.execSQL(Subte.Insert15());
			db.execSQL(Subte.Insert16());
			db.execSQL(Subte.Insert17());
			db.execSQL(Subte.Insert18());
			db.execSQL(Subte.Insert19());
			db.execSQL(Subte.Insert20());
			db.execSQL(Subte.Insert21());
			db.execSQL(Subte.Insert22());
			db.execSQL(Subte.Insert23());
			db.execSQL(Subte.Insert24());
			db.execSQL(Subte.Insert25());
			db.execSQL(Subte.Insert26());
			db.execSQL(Subte.Insert27());
			db.execSQL(Subte.Insert28());
			db.execSQL(Subte.Insert29());
			db.execSQL(Subte.Insert30());
			db.execSQL(Subte.Insert31());
			db.execSQL(Subte.Insert32());
			db.execSQL(Subte.Insert33());
			db.execSQL(Subte.Insert34());
			db.execSQL(Subte.Insert35());
			db.execSQL(Subte.Insert36());
			db.execSQL(Subte.Insert37());
			db.execSQL(Subte.Insert38());
			db.execSQL(Subte.Insert39());
			db.execSQL(Subte.Insert40());
			db.execSQL(Subte.Insert41());
			db.execSQL(Subte.Insert42());
			db.execSQL(Subte.Insert43());
			db.execSQL(Subte.Insert44());
			db.execSQL(Subte.Insert45());
			db.execSQL(Subte.Insert46());
			db.execSQL(Subte.Insert47());
			db.execSQL(Subte.Insert48());
			db.execSQL(Subte.Insert49());
			db.execSQL(Subte.Insert50());
			db.execSQL(Subte.Insert51());
			db.execSQL(Subte.Insert52());
			db.execSQL(Subte.Insert53());
			db.execSQL(Subte.Insert54());
			db.execSQL(Subte.Insert55());
			db.execSQL(Subte.Insert56());
			db.execSQL(Subte.Insert57());
			db.execSQL(Subte.Insert58());
			db.execSQL(Subte.Insert59());
			db.execSQL(Subte.Insert60());
			db.execSQL(Subte.Insert61());
			db.execSQL(Subte.Insert62());
			db.execSQL(Subte.Insert63());
			db.execSQL(Subte.Insert64());
			db.execSQL(Subte.Insert65());
			db.execSQL(Subte.Insert66());
			db.execSQL(Subte.Insert67());
			db.execSQL(Subte.Insert68());
			db.execSQL(Subte.Insert69());
			db.execSQL(Subte.Insert70());
			db.execSQL(Subte.Insert71());
			db.execSQL(Subte.Insert72());
			db.execSQL(Subte.Insert73());
			db.execSQL(Subte.Insert74());
			db.execSQL(Subte.Insert75());
			db.execSQL(Subte.Insert76());
			db.execSQL(Subte.Insert77());
			db.execSQL(Subte.Insert78());
			db.execSQL(Subte.Insert79());
			db.execSQL(Subte.Insert80());
			db.execSQL(Subte.Insert81());
			db.execSQL(Subte.Insert82());
			db.execSQL(Subte.Insert83());
			
			/*db.execSQL(Insert1());
			db.execSQL(Insert2());
			db.execSQL(Insert3());
			db.execSQL(Insert4());
			db.execSQL(Insert5());
			db.execSQL(Insert6());
			db.execSQL(Insert7());
			db.execSQL(Insert8());
			/**/
		}
		catch(SQLiteException ex){
			Log.e("ERROR", ex.getMessage());
			throw ex;
		}		
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		try{
			
		}
		catch(SQLiteException ex){
			throw ex;
		}
	}

	private static String CreateCard(){
		StringBuilder sb = new StringBuilder();
		sb.append("CREATE TABLE Cards (");
		sb.append("id INTEGER PRIMARY KEY,");
		sb.append("name TEXT,");
		sb.append("description TEXT,");
		sb.append("lng TEXT,");
		sb.append("lat TEXT,");
		sb.append("address TEXT,");
		sb.append("photo TEXT,");
		sb.append("cardtypeid INTEGER);");
		
		return sb.toString();
	}
	
	private static String CreateCardType(){
		StringBuilder sb = new StringBuilder();
		sb.append("CREATE TABLE CardTypes (");
		sb.append("id INTEGER PRIMARY KEY,");
		sb.append("name TEXT);");
	
		return sb.toString();
	}
	
	private static String CreateParameter(){
		StringBuilder sb = new StringBuilder();
		sb.append("CREATE TABLE Parameters (");
		sb.append("id INTEGER PRIMARY KEY,");
		sb.append("name TEXT,");
		sb.append("value TEXT);");
	
		return sb.toString();
	}
	
	
	public static String Insert1() {
		StringBuilder sb = new StringBuilder();
		sb.append("INSERT INTO Cards (name, description, lng, lat, address, photo) VALUES ('Parque Centenario', 'Especio Wi-Fi', '-58.46793333333333','-34.54941666666667','','http://www.ci.desoto.tx.us/images/pages/N1182/wifi.jpg');");
				
		return sb.toString();
	}
	
	public static String Insert2() {
		StringBuilder sb = new StringBuilder();
		sb.append("INSERT INTO Cards ( name, description, lng, lat, address, photo) VALUES ('Parque Lezama', 'Especio Wi-Fi', '-58.48325','-34.55071666666667','','http://www.mundocity.com/images/lezama.jpg');");
				
		return sb.toString();
	}
	
	public static String Insert3() {
		StringBuilder sb = new StringBuilder();
		sb.append("INSERT INTO Cards (name, description, lng, lat, address, photo) VALUES ('Paseo de la Victoria', 'Especio Wi-Fi','-58.47931666666667','-34.55498333333333','', 'http://farm5.staticflickr.com/4050/4644689393_3a25311a5d_z.jpg');");
				
		return sb.toString();
	}
	
	public static String Insert4() {
		StringBuilder sb = new StringBuilder();
		sb.append("INSERT INTO Cards ( name, description, lng, lat, address, photo) VALUES ('Cementerio Chacarita', 'Especio Wi-Fi','-58.47225','-34.55645','', 'http://4.bp.blogspot.com/-GYmLIA9WTrw/ULznd8VYUKI/AAAAAAABsZw/xZPDefTL6e4/s1600/Cementerio-chacarita.jpg');");
				
		return sb.toString();
	}
	
	public static String Insert5() {
		StringBuilder sb = new StringBuilder();
		sb.append("INSERT INTO Cards ( name, description, lng, lat, address, photo) VALUES ('Prueba Dirección 1', 'Especio Wi-Fi','','','Av Cabildo 3501 ciudad autonoma de buenos aires', 'http://4.bp.blogspot.com/-GYmLIA9WTrw/ULznd8VYUKI/AAAAAAABsZw/xZPDefTL6e4/s1600/Cementerio-chacarita.jpg');");
				
		return sb.toString();
	}
	
	public static String Insert6() {
		StringBuilder sb = new StringBuilder();
		sb.append("INSERT INTO Cards ( name, description, lng, lat, address, photo) VALUES ('Prueba Dirección 2', 'Especio Wi-Fi','','','Av Crisologo Larralde 2520 ciudad autonoma de buenos aires', 'http://4.bp.blogspot.com/-GYmLIA9WTrw/ULznd8VYUKI/AAAAAAABsZw/xZPDefTL6e4/s1600/Cementerio-chacarita.jpg');");
				
		return sb.toString();
	}
	
	public static String Insert7() {
		StringBuilder sb = new StringBuilder();
		sb.append("INSERT INTO Cards ( name, description, lng, lat, address, photo) VALUES ('Dirección Flavia', 'Especio Wi-Fi','','','THORNE 454 ciudad autonoma de buenos aires', 'http://4.bp.blogspot.com/-GYmLIA9WTrw/ULznd8VYUKI/AAAAAAABsZw/xZPDefTL6e4/s1600/Cementerio-chacarita.jpg');");
				
		return sb.toString();
	}
	
	public static String Insert8() {
		StringBuilder sb = new StringBuilder();
		sb.append("INSERT INTO Cards ( name, description, lng, lat, address, photo) VALUES ('Dirección Flavia', 'Especio Wi-Fi','','','Tucuman 744 ciudad autonoma de buenos aires', 'http://www.ci.desoto.tx.us/images/pages/N1182/wifi.jpg');");
				
		return sb.toString();
	}
	
	public static String Insert9() {
		StringBuilder sb = new StringBuilder();
		sb.append("INSERT INTO Cards (id, name, description, lng, lat, address, photo) VALUES (209, 'Tucum�n - Mateo', 'Especio Wi-Fi','','','Azcuenaga 300, San Miguel de Tucuman', 'http://4.bp.blogspot.com/-GYmLIA9WTrw/ULznd8VYUKI/AAAAAAABsZw/xZPDefTL6e4/s1600/Cementerio-chacarita.jpg');");
				
		return sb.toString();
	}
	
	public static String Insert10() {
		StringBuilder sb = new StringBuilder();
		sb.append("INSERT INTO Cards (id, name, description, lng, lat, address, photo) VALUES (210, 'Tucum�n - Mateo', 'Especio Wi-Fi','','','Azcuenaga 260, San Miguel de Tucuman', 'http://4.bp.blogspot.com/-GYmLIA9WTrw/ULznd8VYUKI/AAAAAAABsZw/xZPDefTL6e4/s1600/Cementerio-chacarita.jpg');");
				
		return sb.toString();
	}
	
	public static String Insert11() {
		StringBuilder sb = new StringBuilder();
		sb.append("INSERT INTO Cards (id, name, description, lng, lat, address, photo) VALUES (11, 'Tucum�n - Mateo', 'Especio Wi-Fi','','','Don Bosco 2789, San Miguel de Tucuman', 'http://4.bp.blogspot.com/-GYmLIA9WTrw/ULznd8VYUKI/AAAAAAABsZw/xZPDefTL6e4/s1600/Cementerio-chacarita.jpg');");
				
		return sb.toString();
	}
	
}